package com.example.its2021606134chh.BusModule;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

/**
 * @ClassName: BusSQLiteOpenHelper$
 * @Description: 作用
 * @Author: letquit
 * @CreateDate: 20/8/2021$
 * @Version: 1.0
 */
public class BusSQLiteOpenHelper extends SQLiteOpenHelper {
    public BusSQLiteOpenHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql="create table busline(id integer primary key ,busline_name varchar not null, start_place varchar, end_place varchar, start_place_start_time varchar, start_place_end_time varchar, end_place_start_time varchar, end_place_end_time varchar, price integer, route varchar)";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
